using ExitGames.Client.Photon;
using UnityEngine;

public class RoomPropertyFunction : MonoBehaviour
{
	public static int GetItemScore()
	{
		int result = 0;
		if (PhotonNetwork.room.customProperties.ContainsKey("CurrentProps"))
		{
			return (int)PhotonNetwork.room.customProperties["CurrentProps"];
		}
		return result;
	}

	public static void AddItemScore()
	{
		int num = GetItemScore() + 1;
		Hashtable hashtable = new Hashtable();
		hashtable.Add("CurrentProps", num);
		PhotonNetwork.room.SetCustomProperties(hashtable);
	}

	public static void RemoveItemScore()
	{
		int num = GetItemScore() - 1;
		Hashtable hashtable = new Hashtable();
		hashtable.Add("CurrentProps", num);
		PhotonNetwork.room.SetCustomProperties(hashtable);
	}

	public static int GetGameModer()
	{
		int result = 1;
		if (PhotonNetwork.room.customProperties.ContainsKey("C1"))
		{
			return (int)PhotonNetwork.room.customProperties["C1"];
		}
		return result;
	}

	public static int GetGameMap()
	{
		int result = 1;
		if (PhotonNetwork.room.customProperties.ContainsKey("C0"))
		{
			return (int)PhotonNetwork.room.customProperties["C0"];
		}
		return result;
	}

	public static void AddMobCount()
	{
		int num = GetCountMobs() + 1;
		Hashtable hashtable = new Hashtable();
		hashtable.Add("CurrentMobs", num);
		PhotonNetwork.room.SetCustomProperties(hashtable);
	}

	public static void RemoveMobCount()
	{
		int num = GetCountMobs() + 1;
		Hashtable hashtable = new Hashtable();
		hashtable.Add("CurrentMobs", num);
		PhotonNetwork.room.SetCustomProperties(hashtable);
	}

	public static int GetCountMobs()
	{
		int result = 1;
		if (PhotonNetwork.room.customProperties.ContainsKey("CurrentMobs"))
		{
			return (int)PhotonNetwork.room.customProperties["CurrentMobs"];
		}
		return result;
	}

	public static void AddWaveCount()
	{
		int num = GetCountMobs() + 1;
		Hashtable hashtable = new Hashtable();
		hashtable.Add("CurrentWave", num);
		PhotonNetwork.room.SetCustomProperties(hashtable);
	}

	public static void RemoveWaveCount()
	{
		int num = GetCountMobs() + 1;
		Hashtable hashtable = new Hashtable();
		hashtable.Add("CurrentWave", num);
		PhotonNetwork.room.SetCustomProperties(hashtable);
	}

	public static int GetCurrentWave()
	{
		int result = 1;
		if (PhotonNetwork.room.customProperties.ContainsKey("CurrentWave"))
		{
			return (int)PhotonNetwork.room.customProperties["CurrentWave"];
		}
		return result;
	}
}
